from functools import reduce

mylist = [1, 2, 3, 4, 5]
def f(x):
    return x**2

newmap1 = map(f, mylist)
newmap2 = map(lambda x:x**2, mylist)
print(list(newmap1))
print(list(newmap2))

newfilter1 = filter(lambda x:x>3, mylist)
print(list(newfilter1))

newreduce1 = reduce(lambda x,y:x+y, mylist)
print(newreduce1)